<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>iconvert</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : 29/06/2005</div>
    <p>
      <b>iconvert</b> -  conversion to 1 or 4 byte integer representation</p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>y=iconvert(X,itype)  </tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>X</b>
        </tt>: matrix of floats or integers</li>
      <li>
        <tt>
          <b>y</b>
        </tt>: matrix of integers coded on one, two or four bytes.</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>
    converts and stores data two one, two or four bytes integers. 
  </p>
    <dl>
      <dd>
        <b>itype=0</b>: return floating point numbers</dd>
      <dd>
        <b>itype=1</b>: return int8 numbers in the range [-128,127]</dd>
      <dd>
        <b>itype=11</b>: return uint8 numbers in the range [0,255]</dd>
      <dd>
        <b>itype=2</b>: return int16 numbers in the range [-32768,32767]</dd>
      <dd>
        <b>itype=12</b>: return uint16 numbers in the range [0, 65535]</dd>
      <dd>
        <b>itype=4</b>: return int32 numbers in the range [-2147483648,2147483647]</dd>
      <dd>
        <b>itype=14</b>: return uint32 numbers in the range [0, 4294967295]</dd>
    </dl>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

b=int32([1 -120 127 312])
y=iconvert(b,1)

 
  </pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="../elementary/double.htm">
        <tt>
          <b>double</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="inttype.htm">
        <tt>
          <b>inttype</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
  </body>
</html>
